<template>
    <h1>Image</h1>
    <p>1.在模板里可以直接引入图片</p>
    <img src="@/assets/images/logo.png"/>
    <p>2.在JS中引入</p>
    <img :src="logoUrl"/>
    <p>3.在CSS中直接引入</p>
    <div class="logo"></div>
    <p>4.直接放入public目录，直接使用</p>
</template>
<script setup>
import logoUrl from '@/assets/images/logo.png';
</script>
<style>
img{
    width:50px;
}
.logo{
    width:50px;
    height:50px;
    background-image: url(@/assets/images/logo.png);
    background-size: contain;
}
</style>